﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using EHTWebsite.Code;
namespace EHTWebsiteProject.Code.BLL
{
    public class GiaoDienProvider
    {
        public static DataSet GetGiaoDien(Boolean IsSelect)
        {
            SqlCommand command = new SqlCommand();
            command.CommandText = "[proc_GetGiaoDien]";
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.Add(new SqlParameter("@IsSelect", IsSelect)); 

            return DataProvider.ExecuteDataSet(command);
        }

        public static void changePublish(Int32 GiaoDienID)
        {
            SqlCommand command = new SqlCommand();
            command.CommandText = "[proc_UpdatePublishGiaoDien]";
            command.CommandType = CommandType.StoredProcedure;
            command.Parameters.Add(new SqlParameter("@GiaoDienID", GiaoDienID));            

            DataProvider.ExecuteNoneQuery(command);
        }

    }
}